The present invention relates to a highly efficient image coding system for coding an image employed in an image transmitting apparatus and the like, and in particular, to an entropy-coding system which has a high encoding efficiency and which is capable of reducing the total number of bits after the coding operation among the systems in which nonsignificant data (having a value of 0) is subjected to a run-length coding and significant data (having a value other than 0) is subjected to an ordinary Huffman coding.
Incidentally, in the Japanese Patent Unexamined Publication JP-A-62-108663, there is described a highly efficient image coding system in which the Huffman coding and the run length coding are applied to the significant and nonsignificant data, respectively.
According to the Huffman coding, a code system of which each code comprises a reduced number of bits is applied to data frequently appearing with a higher probability of occurrence, whereas a code system of which each code comprises a greater number of bits is applied to data less frequently appearing with a lower probability of occurrence. In addition, according to the run length coding, a run length determined for a sequence of the same data is processed as data so as to be assigned with a variable length code like in the case of the Huffman coding.
In the system, based on a fact that consecutive significant data (of the Huffman code) is immediately followed by the nonsignificant data (of the run length code), a cluster code (a prefix code of the run length code) is added so as to follow the consecutive Huffman code.
With this provision of a cluster code, as compared with a system in which a code type judge bit is added at the first bit position of the Huffman code and the run length code, the coding efficiency is improved and the total number of the bits after the coding operation can be reduced.
However, since the run length code has a prefix code therebefore in every case, when the run length code appears frequently, the prefix code also appears with the same frequency, which results in a lowering of the coding efficiency.